Pin cryptography>=44.0.2 for PyPy 3.11 compatibility#46654
Pin cryptography>=44.0.2 for PyPy 3.11 compatibility#46654rohitsinghal4u merged 14 commits intomainfrom
Conversation
…on (#fix-mypy-keys) Change tags property return type from Dict[str, str] to Optional[Dict[str, str]] to match the actual implementation which can return None when no tags are set. azure/keyvault/keys/_models.py:261: error: Incompatible return value type (got 'Any | None', expected 'dict[str, str]') [return-value]
The mindependency check was resolving cryptography==40.0.2 via pyopenssl, which has incompatible Rust bindings on PyPy 3.11 (undefined symbol: PySlice_AdjustIndices). Version 44.0.2 is the first to ship PyPy 3.11 wheels. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to fix the azure-keyvault-certificates minimum-dependency CI failure on PyPy 3.11 by ensuring the resolved cryptography version includes PyPy 3.11-compatible wheels.
Changes:
- Add
cryptography>=44.0.2toazure-keyvault-certificates/dev_requirements.txtto force a PyPy 3.11-compatiblecryptographyduring the mindependency run. - Update
azure-keyvault-keysKeyProperties.tagsreturn type toOptional[Dict[str, str]]and align the docstring accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt | Pins cryptography to avoid resolving an incompatible minimum version on PyPy 3.11. |
| sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py | Adjusts the tags property type annotation/docstring to allow None. |
|
@copilot apply changes based on the comments in this thread |
…yproject.toml Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/5eb197c9-98b3-4aab-b6ff-e44add5af00e Co-authored-by: rohitsinghal4u <5697065+rohitsinghal4u@users.noreply.github.com>
Done in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot apply changes based on the comments in this thread |
These changes were already applied in commit
|
- Add __deepcopy__ to KeyVaultRSAPublicKey and KeyVaultRSAPrivateKey to satisfy new abstract method added in cryptography 47.0.0 - Pin cryptography<47.0.0 in certificates dev_requirements.txt to avoid broken PyPy 3.11 wheel served by CI feed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
…ments.txt and pyproject.toml; restore _models.py to base state Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/a9fef9e3-33a3-405a-ac91-fc2cedda87de Co-authored-by: rohitsinghal4u <5697065+rohitsinghal4u@users.noreply.github.com>
Done in commit
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… crypto. adjust keys conftest for required changes for 3.14. allowed pyopenssl to pull new versions from upstream in the public/azure-sdk-for-python feed, so openssl related errors should also disappear.
Problem
The keyvault-certificates pipeline (\python - keyvault) fails on the \Test ubuntu2404_pypy311\ job because the \mindependency\ check resolves \cryptography==40.0.2\ (via \pyopenssl), which has Rust bindings incompatible with PyPy 3.11:
\
ImportError: ...cryptography/hazmat/bindings/_rust.pypy311-pp73-x86_64-linux-gnu.so: undefined symbol: PySlice_AdjustIndices
\\
Failing build: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6234915
Fix
Pin \cryptography>=44.0.2\ in \dev_requirements.txt. Version 44.0.2 is the first release that ships PyPy 3.11 wheels (per the changelog).
Impact